//一个LED灯闪烁 //注意端口
#include <reg51.h>
#include <intrins.h>

#define uchar unsigned char
#define uint unsigned int

void delay(uchar ms)
{
    uchar j;
    while(ms--)
    {
        for(j = 0; j < 2000; j++)
            _nop_();
    }
}

void main()
{
    sbit k = P1.0;
    while(1)
    {
        k = 1;
        delay(100);
        k = ~k;
        delay(100);
    }
}